package cn.shiwei.org.service.impl;

import cn.shiwei.basic.query.BaseQuery;
import cn.shiwei.basic.service.impl.BaseServiceImpl;
import cn.shiwei.basic.util.PageList;
import cn.shiwei.org.domain.DictionariesDetail;
import cn.shiwei.org.mapper.DictionariesDetailMapper;
import cn.shiwei.org.service.IDictionariesDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DictionariesDetailServiceImpl extends BaseServiceImpl<DictionariesDetail> implements IDictionariesDetailService {

    @Autowired
    private DictionariesDetailMapper detailMapper;

    /*private Integer queryTotal(){
        return typeMapper.queryTotal();
    }*/

    @Override
    public PageList<DictionariesDetail> queryDate(BaseQuery query) {
        Integer total = detailMapper.queryTotal(query);
        List<DictionariesDetail> data = detailMapper.queryDate(query);
        PageList<DictionariesDetail> pageList = new PageList<>(total ,data);
        return pageList;
    }
}
